﻿<%@ Page Title="UserLst" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="UserLst.aspx.cs" Inherits="CarRental.Account.UserLst" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <form id="form1" runat="server">
    <fieldset>
        <legend>User List Form</legend>
        <ol>
            <li>
                <asp:Label ID="lblUserType" runat="server" AssociatedControlID="ddlUserType">User Type</asp:Label>
                <asp:DropDownList ID="ddlUserType" runat="server" Width="200px" Height="25px"></asp:DropDownList>
            </li>
            <li>
                <asp:Label ID="lblUserStatus" runat="server" AssociatedControlID="ddlUserStatus">User Status</asp:Label>
                <asp:DropDownList ID="ddlUserStatus" runat="server" Width="200px" Height="25px"></asp:DropDownList>
            </li>
             <li>
                <p></p>
            </li>
            <li>
                <asp:Button ID="btnSearch" runat="server" Text="Search" Height="40px" OnClick="btnSearch_Click" Width="200px" />
            </li>
            <li>
                <p></p>
            </li>
            <li>
                <asp:GridView ID="gvUser" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" AutoGenerateColumns="False" DataKeyNames="id,login_name,password,user_type,user_name,address,contact_no,status,email" DataSourceID="EntityDataSource" OnRowCommand="gvUser_RowCommand">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:ButtonField ButtonType="Image" CommandName="Edit" Text="Edit" ImageUrl="~/images/Edit.jpg" />
                        <asp:BoundField DataField="user_type_Name" HeaderText="user_type_Name" SortExpression="user_type_Name" />
                        <asp:BoundField DataField="login_name" HeaderText="login_name" SortExpression="login_name" ReadOnly="True" />
                        <asp:BoundField DataField="user_name" HeaderText="user_name" SortExpression="user_name" ReadOnly="True" />
                        <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" ReadOnly="True" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
                <asp:EntityDataSource ID="EntityDataSource" runat="server" ConnectionString="name=car_rental_dbEntities" DefaultContainerName="car_rental_dbEntities" EnableFlattening="False" EntitySetName="vwuser" EntityTypeFilter="vwuser" Where="" AutoGenerateWhereClause="True" Select="">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="ddlUserType" Name="user_type" PropertyName="SelectedValue" />
                        <asp:ControlParameter ControlID="ddlUserStatus" Name="status" PropertyName="SelectedValue" />
                    </WhereParameters>
                </asp:EntityDataSource>
            </li>
        </ol>
        <%--<asp:Button runat="server" ID="btnAddCar" Text="Add Car" OnClick="btnAddCar_Click" />--%>
    </fieldset>
    </form>
</asp:Content>
